<?php
/**
 * Jdfusion
 *
 * @category Jdcloud
 * @package  DragonJd\Jdfusion
 * @author   Jdcloud <jdcloud-api@jd.com>
 * @license  Apache-2.0 http://www.apache.org/licenses/LICENSE-2.0
 * @link     https://www.jdcloud.com/help/faq
 */

namespace DragonJd\Jdfusion;

use DragonJd\JdCloudClient;
use DragonJd\Api\Service;
use DragonJd\Api\DocModel;
use DragonJd\Api\ApiProvider;
use DragonJd\PresignUrlMiddleware;

/**
 * Client used to interact with jdfusion.
 *
 * @method \DragonJd\Result getCloudInfos(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getCloudInfosAsync(array $args = [])
 * @method \DragonJd\Result registCloudInfo(array $args = [])
 * @method \GuzzleHttp\Promise\Promise registCloudInfoAsync(array $args = [])
 * @method \DragonJd\Result getCloudInfoById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getCloudInfoByIdAsync(array $args = [])
 * @method \DragonJd\Result unregistCloudInfo(array $args = [])
 * @method \GuzzleHttp\Promise\Promise unregistCloudInfoAsync(array $args = [])
 * @method \DragonJd\Result validCloudInfo(array $args = [])
 * @method \GuzzleHttp\Promise\Promise validCloudInfoAsync(array $args = [])
 * @method \DragonJd\Result getDeployments(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDeploymentsAsync(array $args = [])
 * @method \DragonJd\Result createDeployment(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createDeploymentAsync(array $args = [])
 * @method \DragonJd\Result reverseDeployment(array $args = [])
 * @method \GuzzleHttp\Promise\Promise reverseDeploymentAsync(array $args = [])
 * @method \DragonJd\Result getDeploymentsById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDeploymentsByIdAsync(array $args = [])
 * @method \DragonJd\Result editDeployment(array $args = [])
 * @method \GuzzleHttp\Promise\Promise editDeploymentAsync(array $args = [])
 * @method \DragonJd\Result deleteDeployment(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteDeploymentAsync(array $args = [])
 * @method \DragonJd\Result cloneDeployment(array $args = [])
 * @method \GuzzleHttp\Promise\Promise cloneDeploymentAsync(array $args = [])
 * @method \DragonJd\Result dryrunDeployment(array $args = [])
 * @method \GuzzleHttp\Promise\Promise dryrunDeploymentAsync(array $args = [])
 * @method \DragonJd\Result applyDeployment(array $args = [])
 * @method \GuzzleHttp\Promise\Promise applyDeploymentAsync(array $args = [])
 * @method \DragonJd\Result getDeploymentResult(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDeploymentResultAsync(array $args = [])
 * @method \DragonJd\Result getDeploymentVersions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDeploymentVersionsAsync(array $args = [])
 * @method \DragonJd\Result getDeploymentsVersion(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDeploymentsVersionAsync(array $args = [])
 * @method \DragonJd\Result rollbackDeploymentsVersion(array $args = [])
 * @method \GuzzleHttp\Promise\Promise rollbackDeploymentsVersionAsync(array $args = [])
 * @method \DragonJd\Result getDeploymentsResultsByIdRecord(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDeploymentsResultsByIdRecordAsync(array $args = [])
 * @method \DragonJd\Result getDisks(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDisksAsync(array $args = [])
 * @method \DragonJd\Result createDisk(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createDiskAsync(array $args = [])
 * @method \DragonJd\Result getDiskById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDiskByIdAsync(array $args = [])
 * @method \DragonJd\Result removeDiskById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise removeDiskByIdAsync(array $args = [])
 * @method \DragonJd\Result attachDiskToVmInstanceByDiskId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise attachDiskToVmInstanceByDiskIdAsync(array $args = [])
 * @method \DragonJd\Result detachDiskToVmInstanceByDiskId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise detachDiskToVmInstanceByDiskIdAsync(array $args = [])
 * @method \DragonJd\Result getBuckets(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getBucketsAsync(array $args = [])
 * @method \DragonJd\Result createBucket(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createBucketAsync(array $args = [])
 * @method \DragonJd\Result getBucketByName(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getBucketByNameAsync(array $args = [])
 * @method \DragonJd\Result deleteBucket(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteBucketAsync(array $args = [])
 * @method \DragonJd\Result getBucketFiles(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getBucketFilesAsync(array $args = [])
 * @method \DragonJd\Result getTransferTasks(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTransferTasksAsync(array $args = [])
 * @method \DragonJd\Result createTransferTask(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createTransferTaskAsync(array $args = [])
 * @method \DragonJd\Result getTransferTaskById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTransferTaskByIdAsync(array $args = [])
 * @method \DragonJd\Result editTransferTask(array $args = [])
 * @method \GuzzleHttp\Promise\Promise editTransferTaskAsync(array $args = [])
 * @method \DragonJd\Result deleteTransferTask(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteTransferTaskAsync(array $args = [])
 * @method \DragonJd\Result startTransferTask(array $args = [])
 * @method \GuzzleHttp\Promise\Promise startTransferTaskAsync(array $args = [])
 * @method \DragonJd\Result stopTransferTask(array $args = [])
 * @method \GuzzleHttp\Promise\Promise stopTransferTaskAsync(array $args = [])
 * @method \DragonJd\Result getTransferTaskProgress(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTransferTaskProgressAsync(array $args = [])
 * @method \DragonJd\Result getTransferTaskFailedFiles(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTransferTaskFailedFilesAsync(array $args = [])
 * @method \DragonJd\Result getRdsAccountsByInstId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getRdsAccountsByInstIdAsync(array $args = [])
 * @method \DragonJd\Result createRdsAccounts(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createRdsAccountsAsync(array $args = [])
 * @method \DragonJd\Result getRdsAccountsByInstIdAndAccountName(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getRdsAccountsByInstIdAndAccountNameAsync(array $args = [])
 * @method \DragonJd\Result deleteRdsAccount(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteRdsAccountAsync(array $args = [])
 * @method \DragonJd\Result grantRdsAccount(array $args = [])
 * @method \GuzzleHttp\Promise\Promise grantRdsAccountAsync(array $args = [])
 * @method \DragonJd\Result revokeRdsAccount(array $args = [])
 * @method \GuzzleHttp\Promise\Promise revokeRdsAccountAsync(array $args = [])
 * @method \DragonJd\Result grantRdsAccountsByTask(array $args = [])
 * @method \GuzzleHttp\Promise\Promise grantRdsAccountsByTaskAsync(array $args = [])
 * @method \DragonJd\Result getRdsDatabasesByInstId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getRdsDatabasesByInstIdAsync(array $args = [])
 * @method \DragonJd\Result createRdsDatabase(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createRdsDatabaseAsync(array $args = [])
 * @method \DragonJd\Result getRdsDatabaseByInstIdAndDbName(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getRdsDatabaseByInstIdAndDbNameAsync(array $args = [])
 * @method \DragonJd\Result deleteRdsDatabase(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteRdsDatabaseAsync(array $args = [])
 * @method \DragonJd\Result getRdsInstances(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getRdsInstancesAsync(array $args = [])
 * @method \DragonJd\Result createRdsInstance(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createRdsInstanceAsync(array $args = [])
 * @method \DragonJd\Result getRdsByInstId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getRdsByInstIdAsync(array $args = [])
 * @method \DragonJd\Result deleteRdsByInstId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteRdsByInstIdAsync(array $args = [])
 * @method \DragonJd\Result getChannels(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getChannelsAsync(array $args = [])
 * @method \DragonJd\Result createChannel(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createChannelAsync(array $args = [])
 * @method \DragonJd\Result deleteChannel(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteChannelAsync(array $args = [])
 * @method \DragonJd\Result startChannel(array $args = [])
 * @method \GuzzleHttp\Promise\Promise startChannelAsync(array $args = [])
 * @method \DragonJd\Result stopChannel(array $args = [])
 * @method \GuzzleHttp\Promise\Promise stopChannelAsync(array $args = [])
 * @method \DragonJd\Result getDatasources(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getDatasourcesAsync(array $args = [])
 * @method \DragonJd\Result createDatasource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createDatasourceAsync(array $args = [])
 * @method \DragonJd\Result deleteDatasource(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteDatasourceAsync(array $args = [])
 * @method \DragonJd\Result getRdsSpecification(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getRdsSpecificationAsync(array $args = [])
 * @method \DragonJd\Result getRegions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getRegionsAsync(array $args = [])
 * @method \DragonJd\Result getRegionsAvailableZones(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getRegionsAvailableZonesAsync(array $args = [])
 * @method \DragonJd\Result getTaskInfoHistoryById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTaskInfoHistoryByIdAsync(array $args = [])
 * @method \DragonJd\Result getTaskInfoById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getTaskInfoByIdAsync(array $args = [])
 * @method \DragonJd\Result getVmImages(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVmImagesAsync(array $args = [])
 * @method \DragonJd\Result getVmInstancesById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVmInstancesByIdAsync(array $args = [])
 * @method \DragonJd\Result deleteVmInstanceById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteVmInstanceByIdAsync(array $args = [])
 * @method \DragonJd\Result getVmInstances(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVmInstancesAsync(array $args = [])
 * @method \DragonJd\Result createVmInstance(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createVmInstanceAsync(array $args = [])
 * @method \DragonJd\Result stopVmInstanceById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise stopVmInstanceByIdAsync(array $args = [])
 * @method \DragonJd\Result startVmInstanceById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise startVmInstanceByIdAsync(array $args = [])
 * @method \DragonJd\Result rebootVmInstanceById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise rebootVmInstanceByIdAsync(array $args = [])
 * @method \DragonJd\Result getVmInstanceTypes(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVmInstanceTypesAsync(array $args = [])
 * @method \DragonJd\Result getVmKeypairsByName(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVmKeypairsByNameAsync(array $args = [])
 * @method \DragonJd\Result deleteVmKeypairByName(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteVmKeypairByNameAsync(array $args = [])
 * @method \DragonJd\Result getVmKeypairs(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVmKeypairsAsync(array $args = [])
 * @method \DragonJd\Result createVmKeypair(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createVmKeypairAsync(array $args = [])
 * @method \DragonJd\Result getVpcEips(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcEipsAsync(array $args = [])
 * @method \DragonJd\Result createVpcEip(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createVpcEipAsync(array $args = [])
 * @method \DragonJd\Result getVpcEipById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcEipByIdAsync(array $args = [])
 * @method \DragonJd\Result deleteVpcEipById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteVpcEipByIdAsync(array $args = [])
 * @method \DragonJd\Result associateVpcEipById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise associateVpcEipByIdAsync(array $args = [])
 * @method \DragonJd\Result disassociateVpcEipById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise disassociateVpcEipByIdAsync(array $args = [])
 * @method \DragonJd\Result getLbHttpListener(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getLbHttpListenerAsync(array $args = [])
 * @method \DragonJd\Result createVpcLBHttpListener(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createVpcLBHttpListenerAsync(array $args = [])
 * @method \DragonJd\Result getVpcNetworkInterfaceById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcNetworkInterfaceByIdAsync(array $args = [])
 * @method \DragonJd\Result deleteVpcNetworkInterfaceById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteVpcNetworkInterfaceByIdAsync(array $args = [])
 * @method \DragonJd\Result getVpcNetworkInterfaces(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcNetworkInterfacesAsync(array $args = [])
 * @method \DragonJd\Result createVpcNetworkInterface(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createVpcNetworkInterfaceAsync(array $args = [])
 * @method \DragonJd\Result attachVpcNetworkInterfaceById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise attachVpcNetworkInterfaceByIdAsync(array $args = [])
 * @method \DragonJd\Result detachVpcNetworkInterfaceById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise detachVpcNetworkInterfaceByIdAsync(array $args = [])
 * @method \DragonJd\Result getVpcSecurityGroupById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcSecurityGroupByIdAsync(array $args = [])
 * @method \DragonJd\Result deleteVpcSecurityGroupById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteVpcSecurityGroupByIdAsync(array $args = [])
 * @method \DragonJd\Result getVpcSecurityGroups(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcSecurityGroupsAsync(array $args = [])
 * @method \DragonJd\Result createVpcSecurityGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createVpcSecurityGroupAsync(array $args = [])
 * @method \DragonJd\Result createSecurityGroupsRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createSecurityGroupsRuleAsync(array $args = [])
 * @method \DragonJd\Result deleteSecurityGroupsRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteSecurityGroupsRuleAsync(array $args = [])
 * @method \DragonJd\Result getVpcSlbById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcSlbByIdAsync(array $args = [])
 * @method \DragonJd\Result deleteVpcSlbById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteVpcSlbByIdAsync(array $args = [])
 * @method \DragonJd\Result getVpcSlbs(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcSlbsAsync(array $args = [])
 * @method \DragonJd\Result createVpcSlb(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createVpcSlbAsync(array $args = [])
 * @method \DragonJd\Result startSlb(array $args = [])
 * @method \GuzzleHttp\Promise\Promise startSlbAsync(array $args = [])
 * @method \DragonJd\Result stopSlb(array $args = [])
 * @method \GuzzleHttp\Promise\Promise stopSlbAsync(array $args = [])
 * @method \DragonJd\Result deleteSlbsListener(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteSlbsListenerAsync(array $args = [])
 * @method \DragonJd\Result startSlbListener(array $args = [])
 * @method \GuzzleHttp\Promise\Promise startSlbListenerAsync(array $args = [])
 * @method \DragonJd\Result stopSlbListener(array $args = [])
 * @method \GuzzleHttp\Promise\Promise stopSlbListenerAsync(array $args = [])
 * @method \DragonJd\Result getVpcSubnetById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcSubnetByIdAsync(array $args = [])
 * @method \DragonJd\Result deleteVpcSubnetById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteVpcSubnetByIdAsync(array $args = [])
 * @method \DragonJd\Result getVpcSubnets(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcSubnetsAsync(array $args = [])
 * @method \DragonJd\Result createVpcSubnet(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createVpcSubnetAsync(array $args = [])
 * @method \DragonJd\Result getVpcById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcByIdAsync(array $args = [])
 * @method \DragonJd\Result deleteVpcById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteVpcByIdAsync(array $args = [])
 * @method \DragonJd\Result getVpcs(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcsAsync(array $args = [])
 * @method \DragonJd\Result createVpc(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createVpcAsync(array $args = [])
 * @method \DragonJd\Result getVpcVServerGroups(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVpcVServerGroupsAsync(array $args = [])
 * @method \DragonJd\Result createVpcVServerGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createVpcVServerGroupAsync(array $args = [])
 * @method \DragonJd\Result getVserverGroupsById(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getVserverGroupsByIdAsync(array $args = [])
 * @method \DragonJd\Result deleteVserverGroup(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteVserverGroupAsync(array $args = [])
 */
class JdfusionClient extends JdCloudClient
{
    public function __construct(array $args)
    {
        $args['with_resolved'] = function (array $args) {
            $this->getHandlerList()->appendInit(
                PresignUrlMiddleware::wrap(
                    $this,
                    $args['endpoint_provider'],
                    [
                        'operations' => [
                        ],
                        'service' => 'jdfusion',
                        'presign_param' => 'PresignedUrl',
                    ]
                ),
                'jdfusion'
            );
        };

        parent::__construct($args);
    }
}